<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ComponentType extends Model
{
    use HasFactory;

    public function component()
    {
        return $this->belongsTo(Component::class);
    }

    public function componentTypeCodes()
    {
        return $this->hasMany(ComponentTypeCode::class);
    }

    protected $casts = [
        'dependencies' => 'array',
    ];
}
